PLS UDE Node
The PLS UDE Node is designed to connect TPT with the Universal Debug Engine by the company PLS to run tests.
The PLS UDE Node configuration has the following tabs:
UDE workspace file
The path to the UDE workspace can be defined. If no workspace is given, the currently opened workspace is used.
Elf/Hex file
The Elf/Hex file of the SUT can be loaded automatically when the Load elf/hex file checkbox is selected and the path is given. To use Hex files, make sure there is a corresponding Elf file with the same name in the directory of the Hex file.
${tpt.tptfile.dir}
in all fields.Source code directory
This field can be used to set a directory to the source code. All C and header files within this directory and its sub-directory can be listed by pressing Ctrl+Space in the Source File column of the Breakpoints tab.
Rename Import
You can also click the button to open the dialog to import a rename mapping from CSV format separated by semicolons. No CSV header is needed. The first column must be the variable name in TPT and the second column must be the variable name in the SUT which will be imported to a Rename mapping flavor, see Mapping Flavor - Rename.
Mapping
Select a mapping from the list. This mapping has to be created previously in the Mapping Editor located in the Declaration Editor, see Declarations - Mappings. If you choose <Use mapping from platform>, the mapping from the FUSION Platform is used.
If you want to read or write UDE variables, the following options are available:
Option | Description |
---|---|
read from or write |
You have to define the bit position as follows in the external name. The syntax is |
read from or write to bit fields (consecutive bits of the whole value) |
You have to define the bit position as follows in the external name. The syntax is |
read or write local variables |
Local variables must have an |
read from or write to the specified controller/core by using a suffix |
You can suffix the UDE variable name. The syntax is If a suffix is specified, TPT always reads this variable from the specified controller/core instead of the controller/core of the breakpoint, see Breakpoints. If no suffix is specified, TPT reads from the controller/core of the breakpoint. |
read or write register channels |
Register channels have the same syntax as the read and write channels. The external name is the name of the register. |
read from or write to memory locations |
Memory locations of the SUT can also be read and written. The external name has to start with |
The PLS UDE Node can handle all data types available in TPT. To access values of maps, curves, or matrices the memory information of the A2L mapping flavor is needed. This flavor is created automatically when importing an A2L file with the Import Interface wizard, see Declarations - Import Interface. It should be a flavor of the mapping selected in the Mapping field.
Breakpoints can be added to the table by entering a breakpoint name, source file, line number and an expression. All breakpoints are automatically generated.
Breakpoint Name
Always
This mode is set by default in the first row and can not be deleted. It means there is no synchronization between TPT and UDE, and both programs may run without breakpoints. In the Action tab, defined actions for this mode are performed in every TPT step cycle without the need to break at a certain UDE location. This enables a fast execution of the SUT via the debugger without a breakpoint. For a breakpointless execution, no settings in the Program tab must be defined.
Source File
Enter the file name from the UDE project. You can use the autocompletion feature (Ctrl+Space).
Line
Indicates where the breakpoint is located in the code.
Expression
There can be several types of expressions to indicate where the breakpoints are located:
endof(<function_name>)
, for example,endof(SuT_cycle)
- absolute hexadecimal address
- location description
<function_name>
+L<line_offset>
, for example,SuT_cycle+L4
<function_name>
+L<line_offset>
+0x<address_offset>
, for example,SuT_cycle+L4+0x30000ABC
<function_name>
+0x<address_offset>
For inline functions and static functions:
<source_file_path> <function_name>
+L<line_offset>
, for example,C:\Temp\main.c SuT_cycle+L4
<source_file_path> <function_name>
+L<line_offset> + 0x<address_offset>
<source_file_path> <function_name>
+0x<address_offset>
<source_file_path>
with spaces requires '
or "
delimiters.Controller Index
If you have multiple controllers in a UDE workspace, you can address them here. TPT uses the corresponding UDE controller for read/write actions.
Core Index
If you have multiple cores in a UDE controller, you can address it here.
Enable
The PLS UDE Node creates the breakpoints and sets them to disabled. The node automatically enables the next expected breakpoint. To enable a breakpoint by default, select the Enable checkbox.
The Program tab defines the program/sequence to be executed using the run
or setNextStatement
commands. The command run
lets UDE to run to a breakpoint, for example run(b)
, where b
is a breakpoint created in the Breakpoints tab. The command setNextStatement
sets the program counter in UDE to the location specified by the argument breakpoint name, for example setNextStatement(b)
.
The program steps will not be executed in a sequential order as for example in a step list. The target breakpoint of the command specifies the next line to be executed. Use the icons or to set any specific visual order.
As soon as a breakpoint has been reached, TPT performs the actions that have been specified for this breakpoint. That is, TPT stimulates the SUT and reads back the reaction of the SUT. The actions are executed on the UDE controller and core specified for this breakpoint in the Breakpoint tab.
For example, to debug a function specify write actions for its arguments at the first breakpoint that is located at function start. To read the return value of the function, add a second breakpoint at function end and define corresponding read actions.
In the run
command, you can specify additional breakpoints as argument list (the first breakpoint remains the target breakpoint which defines the next step of the program). It is required that UDE stops at all breakpoints at the same time. Then, TPT executes the read/write actions for all breakpoints at the same time.
You do not have to insert a program step for each specified breakpoint. The actions for specified breakpoints are executed during the program execution, even if not listed in the program. That means, if an intermediate breakpoint is not listed in the program, its actions will be executed too when the breakpoint is reached.
If no program steps are specified, the debugger is started by TPT and a new FUSION cycle starts for each breakpoint reached.
If at least one program step is added into the Program tab, the program is executed starting at PROGRAMSTART. PROGRAMSTART cannot be changed. For each further line a breakpoint must be selected in the Breakpoint Name column.
The Command column can be left empty. The FUSION execution then takes place without the program. No more breakpoints are encountered. Only the actions of the specified Always mode are executed in each FUSION cycle.
If a run()
or setNextStatement()
is used in the Command column with a breakpoint that is not listed in the Program tab but is listed in the Breakpoints tab, then FUSION execution is terminated, i.e. execution of the current test case is terminated.
You can use UDE macros as well. Several UDE macros can be used in a single row separated by a semicolon. These macros have to be already defined in UDE, for example, macro1();macro2();macro4();run(start)
.
Cycle
Select this checkbox to start a new FUSION cycle at this breakpoint after the execution of the specified actions. Within each cycle, several commands can be transmitted from TPT to the debugger. For example, memory initialization can first be performed before running to breakpoints where the actual test execution happens. If you do not check Cycle at the program steps for memory initialization (see image above), the FUSION cycle remains the same so that the actual outcome of the test execution starts at step 0.
At least one Cycle checkbox must be selected.
The Actions tab shows information about which channels or parameters should be written or read at each breakpoint. Only already declared channels and parameters are available for selection. Use the checkboxes and the filter field to filter the table.
Click Add channels / parameters to actions to add channels and parameters to the table or use Remove channels/parameters from actions to delete them (or press Del). Multiple selection is also possible. You can import and export actions based on a CSV file.
Click Import actions from CSV file to import actions from a CSV file. After selecting the CSV file in a first dialog, a second dialog shows a table for you to decide whether the actions of channels / parameters at a breakpoint (the column name) should be applied. Not existing breakpoints will be created.
Click Export actions from CSV file to export actions to a CSV file.
Update TPT signature
Updates the signature automatically, according to the Actions tab, for all available nodes in the current TPT file. Signals with neither a read or write action will be removed from the signature. Signals with both read and write actions will be set as input signals to the SUT.
Reset before test execution
If checked, the debugger target is reset to the main entry point of the binary before each test case execution.
Run after test execution
If checked, the debugger is started by TPT after each test case execution.
Close workspace
Automatically closes the Eclipse UDE workspace after test execution.
Activates code coverage tracking by UDE. The information about code coverage will be automatically available through a link in the TPT report. To reset the trace at a certain time in the test execution, see Service Step Type - PLS UDE.
Show message box at unknown breakpoints
If checked, FUSION execution is stopped and a message box is shown if the debugger reaches a breakpoint that is not specified in the Breakpoint tab. In this case, FUSION execution continues only after the user closes the message box. This is useful for interactively debugging.
No progress logging
Turns off the progress logging to speed up the test execution.
Reduce written channels/parameters to minimum
Only channels/parameters used within the current test are written.
Breakpoint timeout
Specifies the maximum time TPT should wait for UDE to reach the next breakpoint.
UDE Version
Specifies the UDE Version to be used. Use, for example, 4.8 for UDE version 4.08.01. If none is given, the latest installed UDE version will be used.
Test execution behavior if an error occurs during read or write actions
Test execution error on read failure
Select to finish a test execution with execution error whenever a channel or parameter cannot be read from the debugger target.
Test execution error on write failure
Select to finish a test execution with execution error whenever a channel or parameter cannot be written to the debugger target
Create channels that count failed reads and writes
Click to create the channel debugger_tpt_read_status
that counts the failed reads, and the channel debugger_tpt_write_status
that counts the failed writes.
Create special constants for UDE
Creates special constants like NaN or infinity. A float and a double data type will be created in the Type Editor with the required enumerations. These constants can be used for example in the step list for test modeling.